/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author Cheng
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '/@/api/model/baseModel';

const { adminPath } = useGlobSetting();

export interface InMeasuringEquipment extends BasicModel<InMeasuringEquipment> {
  enterpriseId?: string; // 所属企业code
  enterpriseName?: string; // 所属企业名称
  equipmentName?: string; // 设备名称
  equipmentType?: string; // 设备类型
  thresholdValue?: number; // 监测阈值-最小值
  thremaxValue?: number; // 监测阈值-最大值
  imei?: string; // 设备IMEI
  createTime?: string; // 创建时间，保留2位小数
  updateTime?: string; // 更新时间
  buildId?: number; // 安装建筑ID
  buildName?: string; // 安装建筑名称
  floorNum?: string; // 楼层
  regionId?: number; // 区域ID
  regionName?: string; // 区域名称
  longitude?: string; // 经度
  latitude?: string; // 纬度
  address?: string; // 详细地址
  image?: string; // 示例图
  mark?: string; // 是否为统计设备 01 是，02 为不是
  pressureType?: string; // 监测类型 01 喷淋泵压力 10 消火栓泵压力 20 最不利点消火栓压力 30 喷淋管网压力
  jctime?: number; // 检测间隔
  deleted?: string; // deleted
  cardCode?: string; // 卡号
}

export const inMeasuringEquipmentList = (params?: InMeasuringEquipment | any) =>
  defHttp.get<InMeasuringEquipment>({ url: adminPath + '/device/management/inMeasuringEquipment/list', params });

export const inMeasuringEquipmentListData = (params?: InMeasuringEquipment | any) =>
  defHttp.post<Page<InMeasuringEquipment>>({ url: adminPath + '/device/management/inMeasuringEquipment/listData', params });

export const inMeasuringEquipmentForm = (params?: InMeasuringEquipment | any) =>
  defHttp.get<InMeasuringEquipment>({ url: adminPath + '/device/management/inMeasuringEquipment/form', params });

export const inMeasuringEquipmentSave = (params?: any, data?: InMeasuringEquipment | any) =>
  defHttp.postJson<InMeasuringEquipment>({ url: adminPath + '/device/management/inMeasuringEquipment/save', params, data });

export const inMeasuringEquipmentDelete = (params?: InMeasuringEquipment | any) =>
  defHttp.get<InMeasuringEquipment>({ url: adminPath + '/device/management/inMeasuringEquipment/delete', params });

export const getDeviceDetails = (params?: any, data?: InMeasuringEquipment | any) =>
  defHttp.postJson<InMeasuringEquipment>({ url: adminPath + '/device/management/inMeasuringEquipment/getDeviceDetails', params });



